<?xml version='1.0' encoding='UTF-8' ?>
<!--
   This file is a part of dcstore project,
   licensed under GPLv2
  
   Dominik Cebula
   dominikcebula@gmail.com
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition template="./admin-template.xhtml">

            <ui:define name="main">
                <fieldset id="tax">
                    <label>Tax rates</label>
                    <h:form>
                        #{settingsWeb.Load()}
                        <h:selectManyListbox value="#{taxWeb.idDelete}">
                            <f:selectItems value="#{taxWeb.all}"
                                           var="t"
                                           itemValue="#{t.id}"
                                           itemLabel="#{t.rate}" />
                        </h:selectManyListbox><br />
                        <h:inputText size="8"                                     
                                     value="#{taxWeb.rateNew}"
                                     required="true"
                                     requiredMessage="Tax field required" />
                        <h:commandButton value="Add"
                                         action="#{taxWeb.add()}" />
                        <h:commandButton value="Delete"
                                         action="#{taxWeb.del()}" />
                    </h:form>
                </fieldset>
                <fieldset id="settings">
                    <label>Settings</label>
                    <h:form>
                        <table>
                            <tbody>
                                <tr>
                                    <td>Currency</td>
                                    <td><h:inputText value="#{settingsWeb.currency}" /></td>
                                </tr>
                                <tr>
                                    <td>
                                        <h:commandButton value="Save"
                                                         action="#{settingsWeb.Save()}" />
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </h:form>
                </fieldset>
            </ui:define>

        </ui:composition>

    </body>
</html>
